Skip to content

tests(ourlogs): Add basic tests for ourlogs in events sections #97554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Zylphrex
Copy link
Member

@Zylphrex Zylphrex commented Aug 9, 2025

No description provided.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 9, 2025
beforeEach(function () {
// the search query combobox is firing updates and causing console.errors
jest.spyOn(console, 'error').mockImplementation(() => {});
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Unrestored Spy Masks Test Failures

The console.error spy is set up in beforeEach but not restored in afterEach. This global mutation can hide real errors in subsequent tests, leading to test pollution and masked failures. Restore the spy in afterEach (e.g., using jest.restoreAllMocks()).

Fix in Cursor Fix in Web

@Zylphrex Zylphrex merged commit f556e2e into master Aug 11, 2025
47 checks passed
@Zylphrex Zylphrex deleted the txiao/tests/add-basic-tests-for-ourlogs-in-events-sections branch August 11, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants